//
//  ZHBlogModule.m
//  ArthurRoom
//
//  Created by 赵宏亚 on 2019/8/19.
//  Copyright © 2019 ArthurRoom. All rights reserved.
//

#import "ZHBlogModule.h"
#import "BeeHive.h"
#import "BHRouter.h"
#import "ZHBlogViewController.h"
#import "ZHBlogServiceProtocol.h"

@interface ZHBlogModule ()<BHModuleProtocol>

@end

@implementation ZHBlogModule

+ (void)load
{
    [BeeHive registerDynamicModule:[self class]];
}

- (id)init{
    if (self = [super init])
    {
        NSLog(@"TradeModule init");
    }
    
    return self;
}

-(void)modInit:(BHContext *)context
{
    NSLog(@"模块初始化中");
    NSLog(@"ZHBlogModulemoduleConfigName **** %@",context.moduleConfigName);
    
    
//    id<ZHBlogServiceProtocol> service = [[BeeHive shareInstance] createService:@protocol(ZHBlogServiceProtocol)];
    
}



- (void)modSetUp:(BHContext *)context
{
    [[BeeHive shareInstance]  registerService:@protocol(ZHBlogServiceProtocol) service:[ZHBlogViewController class]];
    
    
    [[BHRouter globalRouter] addPathComponent:@"blogvc" forClass:[ZHBlogViewController class] handler:^(NSDictionary<NSString *,id> *params) {
        
        id<ZHBlogServiceProtocol> service = [[BeeHive shareInstance] createService:@protocol(ZHBlogServiceProtocol)];
        
        
        
        
    }];
    
    NSLog(@"TradeModule setup");
    
}

- (void)basicModuleLevel
{
    
}

@end
